//
// Created by root on 20-1-15.
//

#ifndef WORLDMAGISK_AP_CHANGER_H
#define WORLDMAGISK_AP_CHANGER_H

#include <string>
#include <elf.h>
#include "base.h"
#include "file_utils.h"

class LengthBuf{
public:
    LengthBuf(const char* buf,file_size size){
        mBuf=buf;
        mSize=size;
    }
    const char* mBuf;
    file_size mSize;
};

struct APElfInfo{
    Elf32_Ehdr* ehdr;
    Elf32_Shdr* shdrs;
    Elf32_Dyn*  dyn;
    const char* strtab;
    u4 dynSize;
};

class AppProcess{
public:
    AppProcess(const char* file_buf,file_size size);

    void Parse();

private:
    LengthBuf* mFileBuf;
    APElfInfo mInfo;
};
#endif //WORLDMAGISK_AP_CHANGER_H
